#!/usr/bin/python

if __name__ == '__main__':
	import sys
	import string
	import os
from termcolor import colored

def update():
	'''update file path = /home/michael/google.workspace/cupcake090401/out/target/product/generic/symbols/system/lib/libjni_pinyinimeb.so'''
	adb_command = 'adb push'
	file_path = '/home/michael/google.workspace/cupcake090401/out/target/product/generic/symbols/system/lib/libjni_pinyinimeb.so'
	emulator_path = '/data/local'

	exec_command = '%s %s %s' %(adb_command, file_path, emulator_path)
	if 0!=os.system( exec_command ):
		print 'update so to emulator failed!'
	else:
		print colored( 'done', 'red' )

def main( argv ):
	if 'doc' in argv:
		print colored( update.__doc__, 'red' )
	else:
		update()

if __name__ == '__main__':
	main(sys.argv[1:])


